<template>
  <div class="dashboard-container">
    <div class="dashboard-text">name: {{ name }}</div>
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span>卡片名称</span>
        <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
      </div>
      <div v-for="o in 4" :key="o" class="text item">
        {{ '列表内容 ' + o }}
        <!-- icon-class 为 svg图片 的名字 -->
        <svg-icon icon-class="password" class-name="custom-class" />
      </div>
    </el-card>
    <svg>
      <!--
        <symbol>标记的作用是定义一个图像模板，
          你可以使用<use>标记实例化它，然后在SVG文档中反复使用，
            这种用法非常的高效
      -->
      <symbol id="shape">
        <rect x="50" y="50" width="50" height="50" />
        <circle cx="50" cy="50" r="50" />
      </symbol>
      <!-- use 通过id 引用defs声明的标签 -->
      <use xlink:href="#shape" x="50" y="50" />
      <use xlink:href="#shape" x="200" y="50" />
      <use xlink:href="#shape" x="250" y="50" />
      <use xlink:href="#shape" x="300" y="50" />
    </svg>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Dashboard',
  computed: {
    ...mapGetters([
      'name'
    ])
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
